package com.fccommunity.base;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.View;

import com.fccommunity.R;
import com.fccommunity.widget.TitleBar;

/**
 * Created by yiwei on 16/4/17.
 */
public abstract class BaseFragment extends Fragment {


    protected TitleBar titleBar;

    @Override
    public void onViewCreated(View view, Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        titleBar = (TitleBar) view.findViewById(R.id.main_title_bar);
        if(titleBar!=null){
            titleBar.getTitleView().setTextColor(getResources().getColor(R.color.white));
        }
        initTitle();
    }

    protected abstract void initTitle();
}
